namespace Backoffice.Domain.Entities;

public abstract class EntityBase
   {
      public Guid Id { get; protected set; } = Guid.NewGuid();
      public string? Code { get;set; }
      public DateTime CreatedAt { get; set; } = DateTime.UtcNow; //创建时间
      public DateTime UpdatedAt {get;set;} = DateTime.UtcNow; //更新时间
      public bool IsDeleted { get; set; } = false; //是否删除
      public string CreateBy {get;set;} = string.Empty; //创建人
      public string UpdateBy {get;set;} = string.Empty; //更新人
       public byte[] RowVersion {get;set;} = Array.Empty<byte>(); //乐观锁 防止两个人同时修改同一条记录导致数据被覆盖。 Array.Empty<byte>() 表示返回一个空数组

   }